<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Products extends Model
{
    protected $primaryKey = 'product_id';

    protected $fillable = ['product_name', 'price', 'photo', 'category_id', 'shop_category_id', 'shop_id', 'brand', 'description'];

    public function hasPhotos()
    {
    	return $this->hasMany('App\ProductPhoto', 'product_id', 'product_id');
    }
}
